<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .container {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #e3dbf6, #a99bf9);
    padding: 10px;

  }

  .inner {
    width: 300px;
    height: 500px;
    margin: 150px auto 0;
    position: relative;
    transition: all 1s;
    transform-style: preserve-3d;
    perspective: 1000px;
  }

  .inner:hover {
    transform: rotateY(180deg);
  }

  .front,
  .back {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    position: absolute;
    backface-visibility: hidden;
  }

  .front {
    background-image: linear-gradient(160deg, #8aed7d 20%, #c8a54d 80%);
  }

  .back {
    background-image: linear-gradient(160deg, #8f7fd9 20%, #7b2989 80%);
    transform: rotateY(180deg);
  }
</style>

<body>
  <div class="container">
    <div class="inner">
      <div class="front"></div>
      <div class="back"></div>
    </div>
  </div>
  <script>
  </script>
</body>

</html>